using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GraphicLineCreateDemo : MonoBehaviour
{
    public Transform a;
    public Transform b;
    public Material material;
    List<Vector3> vectors;
    GameObject game;
    DottedLine dottedLine;
    public Color newColor;
    // Start is called before the first frame update
    void Start()
    {
         game = new GameObject();
        dottedLine = game.AddComponent<DottedLine>();
    
    }

    private void LateUpdate()
    {
        if (game)
        {
            vectors = new List<Vector3>();
            vectors.Add(a.position);
            vectors.Add(b.position);
            dottedLine.LineCreate(game, newColor, vectors, 0.5f);
        }
    }
}
